﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:navigation="clr-namespace:nRoute.Controls;assembly=nRoute.Framework">

    <!-- REMOVED:
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"-->


    <!-- ******MAIN PAGE STYLES****** --><!-- **STYLE UPDATES FOR NAV TEMPLATE** -->
    <!-- ******CONTENT PAGE STYLES****** --><!-- ******************************* -->
    
    <ResourceDictionary.MergedDictionaries>        
    	<ResourceDictionary Source="Brushes.xaml"/>
    	<ResourceDictionary Source="Fonts.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!-- **************************** -->

	<Style x:Key="LayoutRootGridStyle" TargetType="Grid"/>

	<Style x:Key="NavigationGridStyle" TargetType="Grid">
		<Setter Property="Margin" Value="10,10,0,0"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
	</Style>

	<Style x:Key="BrandingBorderStyle" TargetType="Border">
		<Setter Property="Height" Value="Auto"/>
		<Setter Property="Margin" Value="62,0,20,10"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
	</Style>

	<Style x:Key="BrandingStackPanelStyle" TargetType="StackPanel">
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="Orientation" Value="Vertical"/>
	</Style>

	<Style x:Key="LogoIcon" TargetType="ContentControl">
		<Setter Property="Height" Value="45"/>		
        <Setter Property="Width" Value="280"/>
		<Setter Property="Margin" Value="500,0,100,0"/>
		<Setter Property="VerticalAlignment" Value="Top" />
		<Setter Property="HorizontalAlignment" Value="Right" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ContentControl">
					<Grid>
						<Rectangle Fill="{StaticResource HighlightBrush}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ApplicationNameStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource ApplicationNameBrush}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ApplicationNameFontSize}"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
		<Setter Property="Margin" Value="0,-45,0,0"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
	</Style>

	<Style x:Key="HeaderTextStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource HighlightBrush}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource HeaderFontSize}"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="Margin" Value="0,15,0,4"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
	</Style>

	<Style x:Key="PageHyperlinkButtonStyle" TargetType="HyperlinkButton">
		<Setter Property="TargetName" Value="_new"/>
		<Setter Property="FontSize" Value="{StaticResource HyperlinkFontSize}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
	</Style>

	<Style x:Key="LinksBorderStyle" TargetType="Border">
		<Setter Property="Height" Value="82"/>
		<Setter Property="Margin" Value="0,55,25,0"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="VerticalAlignment" Value="Top" />
		<Setter Property="BorderBrush" Value="{StaticResource HighlightBrush}"/>
		<Setter Property="BorderThickness" Value="30,0,0,0"/>
	</Style>

	<Style x:Key="LinksStackPanelStyle" TargetType="StackPanel">
		<Setter Property="VerticalAlignment" Value="Top"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="Orientation" Value="Horizontal"/>
		<Setter Property="Margin" Value="22,0,0,0"/>
	</Style>

	<Style x:Key="LinkStyle" TargetType="HyperlinkButton">
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush" Value="{StaticResource NavigationBorderBrush}"/>
		<Setter Property="Foreground" Value="{StaticResource NavigationForegroundBrush}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource NavigationFontSize}"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="MinHeight" Value="28"/>
		<Setter Property="MinWidth" Value="78"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="8,4,8,4"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="HyperlinkButton">
					<Grid x:Name="ButtonGrid" Cursor="{TemplateBinding Cursor}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.95"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<HorizontalAlignment>Center</HorizontalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<VerticalAlignment>Center</VerticalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<HorizontalAlignment>Center</HorizontalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<VerticalAlignment>Center</VerticalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="LinkStates">
								<VisualState x:Name="ActiveLink">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InactiveLink"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="ContentBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Opacity="0.4" Padding="0">
							<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
						</Border>
						<Border x:Name="InteractiveBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Background="{StaticResource HoverHyperlinkBackgroundBrush}" BorderThickness="1,1,1,1" Opacity="0" BorderBrush="{StaticResource HoverHyperlinkBackgroundBrush}" CornerRadius="0"/>
						<Border x:Name="InteractiveElementBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed">
							<TextBlock x:Name="InteractiveElement" Foreground="{StaticResource HoverHyperlinkForegroundBrush}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}"/>
						</Border>
						<TextBlock x:Name="DisabledOverlay" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}" Foreground="#FFAAAAAA" Visibility="Collapsed"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ContentBorderStyle" TargetType="Border">
		<Setter Property="Background" Value="{StaticResource WhiteColorBrush}"/>
		<Setter Property="BorderBrush" Value="{StaticResource PageBorderBrush}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Margin" Value="10"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>

		<Setter Property="Effect">
			<Setter.Value>
				<DropShadowEffect BlurRadius="10" Opacity="0.25" ShadowDepth="0"/>
			</Setter.Value>
		</Setter>
	</Style>

    <!-- REMOVED:
    <Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="45,195,0,0"/>
        <Setter Property="Padding" Value="58,15,58,15"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>-->

    <Style x:Key="ContentFrameStyle" TargetType="navigation:NavigationContainer">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Margin" Value="60,120,0,0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="BorderThickness" Value="0"/>
    </Style>

	<Style x:Key="DividerStyle" TargetType="Rectangle">
		<Setter Property="Visibility" Value="Collapsed"/>
	</Style>

    <!-- ********************************** -->
	<Style x:Key="NavContentBorderStyle" TargetType="Border">
		<Setter Property="Margin" Value="45,-42,0,0" />
		<Setter Property="Grid.Row" Value="2" />
	</Style>

    <!-- REMOVED:
    <Style x:Key="NavContentFrameStyle" TargetType="navigation:Frame" BasedOn="{StaticResource ContentFrameStyle}">
        <Setter Property="Margin" Value="0"/>
        <Setter Property="UriMapper">
            <Setter.Value>
                <uriMapper:UriMapper>
                    <uriMapper:UriMapping MappedUri="/Views/Home.xaml" Uri="" />
                    <uriMapper:UriMapping MappedUri="/Views/{pageName}.xaml" Uri="/{pageName}" />
                    <uriMapper:UriMapping MappedUri="/Views/{pageName}.xaml" Uri="{}{pageName}" />
                </uriMapper:UriMapper>
            </Setter.Value>
        </Setter>
    </Style>-->

    <Style x:Key="NavBrandingBorderStyle" TargetType="Border">
		<Setter Property="Margin" Value="62,0,10,10"/>
	</Style>

	<Style x:Key="NavLinksBorderStyle" TargetType="Border" BasedOn="{StaticResource LinksBorderStyle}">
		<Setter Property="Margin" Value="0,0,10,0" />
		<Setter Property="Grid.Row" Value="1" />
	</Style>

    <!-- REMOVED:
    <Style x:Key="PageStyle" TargetType="navigation:Page"/>
    -->

	<Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="BorderThickness" Value="0,0,0,0"/>
		<Setter Property="Margin" Value="0"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
	</Style>

	<Style x:Key="ContentPanelStyle" TargetType="StackPanel"/>

	<Style x:Key="ContentTextStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
		<Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="Margin" Value="0,2,0,2"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
	</Style>

</ResourceDictionary>